import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    children: [
      { path: '', component: () => import('pages/IndexPage.vue'),name:'home' },
      { path: 'dashboard', component: () => import('pages/DashboardPage.vue'),name:'dashboard' },
      { path: 'checkInout', component: () => import('pages/CheckInOutPage.vue'),name:'checkInout' },
      { path: 'depot', component: () => import('pages/DepotPage.vue'),name:'depot' },
      { path: 'stockList', component: () => import('components/reportTable/StockListTable.vue'),name:'stockList' },
      { path: 'part/detail/:id', component: () => import('components/reportTable/PartDetailHistory.vue'),name:'partDetail' },
      { path: 'visualInspection/:id', component: () => import('components/maintenance/VisualInspection.vue'),name:'visualInspection' },
      { path: 'stockItem', component: () => import('pages/StockItemListPage.vue'),name:'stockItem' },
      { path: 'partsMaster', component: () => import('pages/PartsMasterListPage.vue'),name:'partsMaster' },
      { path: 'tasksMaster', component: () => import('pages/TasksMasterPage.vue'),name:'tasksMaster' },
      { path: 'versionMaster', component: () => import('pages/VersionMasterPage.vue'),name:'versionMaster' },
      { path: 'assetMaster', component: () => import('pages/AssetMasterPage.vue'),name:'assetMaster' },
      { path: 'preview/:id', component: () => import('pages/PreviewFormPage.vue'),name:'previewForm' },
      { path: 'preview/checkInOrder/:id', component: () => import('pages/CheckInOrderPage.vue'),name:'checkInOrder' },
      { path: 'activityLog', component: () => import('pages/ActivityLogPage.vue'),name:'activityLog' },
      { path: 'obsolescenceManagement', component: () => import('components/reportTable/ObsolescenceManagement.vue'),name:'obsolescenceManagement' },
      { path: 'meantime', component: () => import('components/reportTable/MeanTime.vue'),name:'meantime' },
      { path: 'regularCheckManagement', component: () => import('components/reportTable/RegularCheckManagement.vue'),name:'regularCheckManagement' },
      { path: 'spareLocation', component: () => import('components/reportTable/SpareLocation.vue'),name:'spareLocation' },
      { path: 'historyReport', component: () => import('components/reportTable/HistoryReportTable.vue'),name:'historyReport' },
      { path: 'nffRecord', component: () => import('components/reportTable/NFFRecordTable.vue'),name:'nffRecord' },
      { path: 'repairingDetailOverview', component: () => import('components/reportTable/RepairingDetailOverview.vue'),name:'repairingDetailOverview' },
      { path: 'inoutSummary', component: () => import('components/reportTable/InoutSummary.vue'),name:'inoutSummary' },
      { path: 'outgoingRecord', component: () => import('components/reportTable/OutgoingRecord.vue'),name:'outgoingRecord' },
      { path: 'pdfexport', component: () => import('components/reportTable/PartDetailpdf.vue'),name:'pdfexport' },
      { path: 'competenceSettings', component: () => import('pages/GroupSettingsPage.vue'),name:'competenceSettings' },
      { path: 'qrCodeAliasMaster', component: () => import('pages/QRCodeAliasMasterMasterPage.vue'),name:'qrCodeAliasMaster' },
      { path: 'qrCodeAliasLocationMaster', component: () => import('pages/QRCodeAliasLocationMasterMasterPage.vue'),name:'qrCodeAliasLocationMaster' },
      { path: 'changepassword', component: () => import('pages/ChangePasswordPage.vue'),name:'changePassword' },
      { path: 'requirement', component: () => import('components/reportTable/RequirementCom.vue'),name:'requirement' },
    ],
  },
  {
    path: '/',
    component: () => import('layouts/OrderLayout.vue'),
    children: [
      { path: 'maintenance/order/:id', component: () => import('pages/MaintenanceOrderPage.vue'),name:'maintenanceOrder' },
      { path: 'maintenance/record/:id', component: () => import('pages/MaintenanceRecordPage.vue'),name:'maintenanceRecord' },
    ],
  },
  {
    path: '/',
    component: () => import('layouts/ReportLayout.vue'),
    children: [
      /*  { path: 'orderDetail/:id', component: () => import('pages/OrderDetailPage.vue'),name:'orderDetail' }, */
      { path: 'oldMainRecord', component: () => import('pages/OldMainRecordPage.vue'),name:'oldMainRecord' },
    ],
  },
  {
    path: '/login',
    component: () => import('src/layouts/BlankLayout.vue'),
    children: [
      { path: '', component: () => import('pages/LoginPage.vue'), name:'login' },
    ],
  },

  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue'),
  },
];

export default routes;
